<?php 
$_host = preg_replace('/^www\.(.*)$/is', '$1', $_SERVER['HTTP_HOST']);
if(strpos($_host, '.la')) {
	$host = 'HaoTu.la';
} else {
	$host = 'HiHiGirl.com';
}
?><!DOCTYPE html>
<html>
<head>
<title><?php echo $this->setting('title');?>::<?php echo $host;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="<?php echo $this->setting('keywords');?>" />
<meta name="description" content="<?php echo $this->setting('description');?>" />
<meta http-equiv="Content-Language" content="<?php echo $this->lang;?>" />
<script type="text/javascript" src="<?php echo $this->baseUrl(_STATIC_HTTP . '/jquery/jquery-1.7.min.js');?>"></script>
<link rel="shortcut icon" href="<?php echo $this->baseUrl('favicon.ico');?>"/>
<style type="text/css">
html {overflow:hidden;}
* {padding:0;margin:0;}
body {background-color:#000;color:#fff;background:url(<?php echo $this->baseUrl('bg.png');?>);font-family:"微软雅黑", "Microsoft Yahei", Verdana, Arial, Helvetica, sans-serif;}
.logo {position:fixed;width:200px;height:44px;left:0;top:5px;z-index:99999;}
.logo a {float:left;width:200px;height:44px;background:url(<?php echo _STATIC_HTTP;?>/www/img/logo.png) no-repeat 0 0;overflow:hidden;text-indent:-1000px;}
ul,li {list-style-type:none;display:inline-block;}
ul.nav, ul.nav a {color:#fff;font-size:13px;text-decoration:none;}
ul.nav a:hover {color:#f00;}
ul.category {position:fixed;top:0;right:0;padding:5px;}
ul.category li {margin:0 0 0 10px;float:left;font-size:16px;}
ul.tag {position:fixed;bottom:0;left:0;padding:3px 0;background:#000;width:100%;}
ul.tag li {margin:0 10px 0 0;padding:0;float:left;}
ul.tag li a {color:#aaa;font-size:12p;x}
.imgcache {position:absolute;left:-100px;top:-100px;width:10px;height:10px;overflow:hidden;}
.mask {
	position:fixed;
	left:0;top:0;
	width:100%;height:100%;
	background-color:#333;
	filter:alpha(Opacity=30);-moz-opacity:0.3;-khtml-opacity:0.3;opacity:0.3;
	z-index:0;
}
</style>
<script type="text/javascript">
function setRb() {
	var url = '<?php echo $this->url('index/index');?>';
	$.ajax({type:'POST',dataType:'json',url:url,data:'a=rb&r=' + Math.random().toString(),success:function(json, status){
		try {
			$('.imgcache img').attr('src', json.url);
		} catch (e) {
			setRb();
		}
	}, error: function (req, msg, e) {setRb();}, timeout: 30000});
}
function cL(bg) {
	$('body').css({'background': '#000000'});
	$('#mask').css({'background': 'url(' + bg + ')'});
	setTimeout(function(){setRb();}, 5000);
}
</script>
</head>

<body>
<div class="logo"><a href="<?php echo $this->url('index/index');?>">HiHiGirl.com</a></div>
<div class="mask" id="mask"></div>
<ul class="nav category"><li><a href="<?php echo $this->url('index/index');?>">首页</a></li><?php 
	$concept = new picture_category_concept('zh_cn');
	foreach($concept->fetchAll(array('category.parent_id = 37964'), array('rand()')) AS $category) {
		echo '<li><a href="' . $this->url('index/category', array('name' => $category->getTitle())) . '">' . $this->escape($category->getTitle()) . '</a></li>';
	}
?></ul>
<ul class="nav tag"><?php 
	$concept = new resource_keyword_concept();
	foreach($concept->fetchAll(array(), array('rand()')) AS $tag) {
		echo '<li><a href="' . $this->url('index/keyword', array('name' => $tag->getName())) . '">' . $this->escape($tag->getName()) . '</a></li>';
	}
?></ul>


<div class="imgcache"><img src="<?php echo $this->baseUrl('bg.jpg');?>" onload="cL(this.src);" onerror="setRb()" /></div>
</body>
</html>
